﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MAPDavy.Entities;

namespace MAPDavy.Repository
{
    public class ReportRepository: MasterRepository,IReportRepository
    {
        public List<Report> GetAllFromReport()
        {
            var query = from r in Context.Reports
                        select r;

            return query.ToList();
        }

        public Report GetFromReportById(int id)
        {
            var query = from r in Context.Reports
                        .Include("ParameterReports")
                        where r.Id == id
                        select r;

            return query.SingleOrDefault();
        }
    }
}
